#ifndef __ULGFX_BOMB_H__
#define __ULGFX_BOMB_H__

#define BOMB_FILE	"./images/bombseed.png"
#define BOMB_R		6				
#define BOMB_G		6
#define BOMB_B		246


#include "VSDL_RGB.h"
#include "VSDL_point.h"
#include "VSDL_image.h"
#include "VSDL_animation.h"

enum ULG_BombStatus{
	BOMB_STAT_NORMAL,
	BOMB_STAT_SCARED,
	BOMB_STAT_EXPLODED,
	BOMB_STAT_DEAD,
};

using namespace std;

class ULG_Bomb{
private:
	static VSDL_Image sourceImage; //Source image is shared by every instance
	VSDL_Point startXY;
	enum ULG_BombStatus status;
	enum ULG_BombStatus lastStatus;
	VSDL_FrameIndependentAnimation animas[3];
public:
	ULG_Bomb();
	ULG_Bomb(VSDL_Point point);
	ULG_Bomb(VSDL_Point point, ULG_BombStatus status);
	void Init();
	void SetStartXY(VSDL_Point point);
	void SetStatus(ULG_BombStatus status);
	void SetAnimaInterval(int frameInterval);
	int GetWidth();
	int GetHeight();
	void OnMouseMove(int mouseX, int mouseY);//Check hot area
	bool OnMouseDown(int mouseX, int mouseY); //If mouseXY in rect return true
	void Show(SDL_Surface *destSurf);
};


#endif /*__ULGFX_BOMB_H__*/
